package com.gper.vip.homework.facotry.abstractF;

import com.gper.vip.homework.facotry.abstractF.*;

public class Test {

    public static void main(String[] args) {
        AbstractCarFactory acf = new ElcCarFactory();
        Car car = acf.createCar();
        car.driver();
        Energy eng = acf.createEnergy();
        eng.use();
        System.out.println("======================");
        acf = new OilCarFactory();
        car = acf.createCar();
        car.driver();
        eng = acf.createEnergy();
        eng.use();
    }
}
